import request from '@/utils/request'


// 查询学生信息列表
export function listStudentMessage(query) {
  return request({
    url: '/student/studentMessage/list' ,
    method: 'get',
    params: query
  })
}

// 根据班级id查询学生
export function getStudentByClassId() {
  return request({
    url: '/student/studentMessage/findStudentNameByClassId',
    method: 'get'
  })
}

// 根据班级id查询学生
export function getStudentByClass(classId) {
  return request({
    url: '/student/studentMessage/findStudentName/' + classId,
    method: 'get'
  })
}


/*查询所有班级*/

export function listClassName() {
  return request({
    url: '/student/class/list',
    method: 'get',
  })
}

// 查询学生信息详细
export function getStudentMessage(id) {
  return request({
    url: '/student/studentMessage/' + id,
    method: 'get'
  })
}
// 根据学生id查询跟踪记录
export function getTrackRecord(id) {
  return request({
    url: '/eduadmin/teacherTrace/trace/' + id,
    method: 'get'
  })
}


// 新增学生信息
export function addStudentMessage(data) {
  return request({
    url: '/student/studentMessage',
    method: 'post',
    data: data
  })
}

// 修改学生信息
export function updateStudentMessage(data) {
  return request({
    url: '/student/studentMessage',
    method: 'put',
    data: data
  })
}
// 批量修改学生信息
export function updateBatchStudentMessage(data) {
  return request({
    url: '/student/studentMessage/batchStudentMessage',
    method: 'put',
    data: data
  })
}
//转班留级
export function updateStateClass(data) {
  return request({
    url: '/student/studentMessage/updateStateClass',
    method: 'post',
    data: data
  })
}

//添加跟踪
export function insertTrack(data) {
  return request({
    url: '/student/studentMessage/insertTrack',
    method: 'post',
    data: data
  })
}


// 删除学生信息
export function delStudentMessage(id) {
  return request({
    url: '/student/studentMessage/' + id,
    method: 'delete'
  })
}
